<template>
  <icon-sun-fill v-if="theme === 'dark'" @click="setTheme('')" />
  <icon-moon-fill v-if="theme === ''" @click="setTheme('dark')" />
</template>

<script lang="ts" setup>
import { onMounted } from "vue";
import { theme, loadTheme, setTheme } from "@/components/common/z-theme";

onMounted(() => {
  loadTheme();
});
</script>

<style scoped lang="less">
svg {
  font-size: 18px;
  cursor: pointer;
  margin: 0 10px;
}
</style>
